﻿ #region Disclaimer/Info
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
 //
 //   File:		Post.Builder.cs
 //   Website:		http://dexterblogengine.com/
 //   Authors:		http://dexterblogengine.com/About.ashx
 //   Rev:		1
 //   Created:		19/01/2011
 //   Last edit:		19/01/2011
 //   License:		GNU Library General Public License (LGPL)
 //   File:            Post.Builder.cs
 //   For updated news and information please visit http://dexterblogengine.com/
 //   Dexter is hosted to Codeplex at http://dexterblogengine.codeplex.com
 //   For any question contact info@dexterblogengine.com
 //
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 #endregion

using System;

namespace Dexter.Domain.Model {
	public partial class Post {
		public static Post CreateNewPost ( string title , Category category , string formattedBody , string username ) {
			return new Post ( title, category, username, formattedBody );
		}

		public static Post CreateNewPublishedPost ( string title, Category category, string formattedBody, string username ) {
			var pst = new Post ( title, category, username, formattedBody );
			pst.PublishDate = DateTime.Now;
			pst.Publish ( );

			return pst;
		}
	}
}
